class Money{
    public double m = 12.5;
}
class Person implements Cloneable{
    public int age;
    Money money = new Money();

    public void eat(){
        System.out.println("吃");
    }

    @Override
    public String toString() {
        return "Person{" +
                "age=" + age +
                '}';
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
public class Testeo {
    public static void main(String[] args) throws CloneNotSupportedException{
        Person person = new Person();
        Person person1 = (Person)person.clone();
    }
    public static void main1(String[] args) throws CloneNotSupportedException {
    Person person = new Person();
    person.age = 99;
    Person person1 = (Person)person.clone();
        System.out.println(person1);
        System.out.println("=================================");
        person1.age = 199;
        System.out.println(person);
        System.out.println(person1);
    }
}
